package com.hnichr.ump.common.ecard.entity;


import com.hnichr.ump.common.entity.UmpEntity;
import com.mxpioframework.jpa.annotation.Generator;
import com.mxpioframework.security.annotation.Dict;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.*;

@Data
@EqualsAndHashCode(callSuper=false)
@Entity
@Table(name = "t_ecard_business_card")
@Schema(description = "个人名片表")
public class EcardBusinessCard extends UmpEntity {
    @Id
    @Generator
    @Column(name = "ID_", updatable = false)
    @Schema(description = "ID")
    private String id;

    @Column(name = "OPEN_ID_")
    @Schema(description = "openId")
    private String openId;

    @Column(name = "NICK_NAME_")
    @Schema(description = "个人名称")
    private String nickName;

    @Column(name = "JOB_")
    @Schema(description = "岗位")
    private String job;

    @Column(name = "DEPARTENT_")
    @Schema(description = "部门")
    private String department;

    @Column(name = "EMAIL_")
    @Schema(description = "email")
    private String email;

    @Column(name = "MOBILE_")
    @Schema(description = "手机")
    private String mobile;

    @Column(name = "PHONE_")
    @Schema(description = "固话")
    private String phone;

    @Column(name = "STATUS_")
    @Schema(description = "是否有效")
    @Dict(dicCode = "YESNO")
    private String status;

    @Column(name = "ID_CARD_NO_")
    @Schema(description = "身份证号")
    private String idCardNo;

    @Column(name = "COMPANY_ID_")
    @Schema(description = "公司id")
    private String companyId;

    @Column(name = "SHARE_CNT_")
    @Schema(description = "分享次数")
    private Integer shareCnt=0;

    @Column(name = "AVATAR_URL_")
    @Schema(description = "头像")
    private String avatarUrl;

    @Column(name = "HIDDEN_AVATAR_")
    @Schema(description = "隐藏头像 1-隐藏 0-不隐藏")
    @Dict(dicCode = "YESNO")
    private String hiddenAvatar;

    @Transient
    @Schema
    private String companyName;
}
